package com.ga666666.imagerepo.servce;

import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: GaoXu
 * @Date: 2022/05/01/14:33
 * @Description:
 */
public interface ImageService {


    /**
     * 上传图片并返回链接
     * @param images
     * @param request
     * @return
     */
    String upload(MultipartFile[] images, HttpServletRequest request);

    /**
     * 根据图片链接获取图片流
     *
     * @param imageLink
     * @return
     */
    BufferedImage getImage(String imageLink) throws IOException;
}
